import request from "@/utils/request";

// 查询【请填写功能名称】列表
export function listTask(query) {
  return request({
    url: "/contract/insideTask/list",
    method: "get",
    params: query,
  });
}

// 查询【请填写功能名称】详细
export function getTask(id) {
  return request({
    url: "/contract/insideTask/" + id,
    method: "get",
  });
}

// 新增【请填写功能名称】
export function addInsideTask(data) {
  return request({
    url: "/contract/insideTask",
    method: "post",
    data: data,
  });
}

// 修改【请填写功能名称】
export function updateTask(data) {
  return request({
    url: "/contract/insideTask",
    method: "put",
    data: data,
  });
}

// 删除【请填写功能名称】
export function delTask(id) {
  return request({
    url: "/contract/insideTask/" + id,
    method: "delete",
  });
}

//任务列表

export function getTaskList(id) {
  return request({
    url: "/contract/task/list/" + id,
    method: "get",
  });
}

//暂停/开始按钮
export function operate(data) {
  return request({
    url: `/contract/task/operate`,
    method: "post",
    data: data,
  });
}

//作废
export function cancelContract(status) {
  return request({
    url: "/contract/info/" + status,
    method: "put",
  });
}
